//
//  NSCalendar+LZExtension.m
//  百思不得姐
//
//  Created by 郝庆 on 16/5/24.
//  Copyright © 2016年 haoqing. All rights reserved.
//

#import "NSCalendar+LZExtension.h"

@implementation NSCalendar (LZExtension)

//+ (instancetype)lz_calendar
//{
//    if (iOS(8)) {
//        return [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
//    } else {
//        return [NSCalendar currentCalendar];
//    }
//}

+ (instancetype)lz_calendar
{
    if ([NSCalendar respondsToSelector:@selector(calendarWithIdentifier:)]) {
        return [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
    } else {
        return [NSCalendar currentCalendar];
    }
}

@end
